;Allows syntax highlighting to work, among other things
(global-font-lock-mode 1)

;; Tell emacs where is your personal elisp lib dir
;; this is the dir you place all your extra packages
(add-to-list 'load-path "~/.emacs.d/libs")
(add-to-list 'load-path "~/.emacs.d/libs/cedet-1.0pre7")
(add-to-list 'load-path "~/.emacs.d/libs/ecb-2.40")
(add-to-list 'load-path "~/.emacs.d/libs/color-theme-6.6.0")
(add-to-list 'load-path (expand-file-name "~/.emacs.d/libs/jdee-2.4.0.1/lisp"))
(add-to-list 'load-path (expand-file-name "~/.emacs.d/libs/elib-1.0"))



;; START BUFFER MOVE
(load-file "~/.emacs.d/libs/buffer-move.el")

;; START COLOR THEME
(load-library "color-theme")



;; START CEDET.--------------------
;; See cedet/common/cedet.info for configuration details.
(load-file "~/.emacs.d/libs/cedet-1.0pre7/common/cedet.el")

;; Enable EDE (Project Management) features
(global-ede-mode 1)

;; Enable EDE for a pre-existing C++ project
;; (ede-cpp-root-project "NAME" :file "~/myproject/Makefile")

;; Enabling Semantic (code-parsing, smart completion) features
;; Select one of the following:

;; * This enables the database and idle reparse engines
(semantic-load-enable-minimum-features)

;; * This enables some tools useful for coding, such as summary mode
;;   imenu support, and the semantic navigator
(semantic-load-enable-code-helpers)

;; * This enables even more coding tools such as intellisense mode
;;   decoration mode, and stickyfunc mode (plus regular code helpers)
;; (semantic-load-enable-gaudy-code-helpers)

;; * This enables the use of Exuberent ctags if you have it installed.
;;   If you use C++ templates or boost, you should NOT enable it.
;; (semantic-load-enable-all-exuberent-ctags-support)
;;   Or, use one of these two types of support.
;;   Add support for new languges only via ctags.
;; (semantic-load-enable-primary-exuberent-ctags-support)
;;   Add support for using ctags as a backup parser.
;; (semantic-load-enable-secondary-exuberent-ctags-support)

;; Enable SRecode (Template management) minor-mode.
;; (global-srecode-minor-mode 1)

;; END CEDET.--------------------

;; START JDE ----------
(require 'jde)


(require 'ecb-autoloads)
(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(ecb-options-version "2.40")
 '(ecb-source-path (quote ("C:\\gaspar\\projects\\mars-clients")))
 '(jde-ant-home "c:/gaspar/tools/apache-ant-1.8.2/")
 '(jde-ant-program "c:/gaspar/tools/apache-ant-1.8.2/bin/ant")
 '(jde-jdk (quote ("1.6.0_20")))
 '(jde-jdk-registry (quote (("1.6.0_20" . "c:/Program Files/Java/jdk1.6.0_20"))))
 '(shell-file-name "c:/gaspar/tools/emacs-22.3/bin/cmdproxy.exe")
 '(show-paren-mode t)
 '(transient-mark-mode t))
(custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 )

(defun grep-project (s)
(interactive "sSearch project for: ")
(grep-find (concat "find . -path '*/.svn' -prune -o -type f -iname '*.java' -print0 | xargs -0 -e grep -ni -s \
-F \"" s "\""))
)

(global-set-key (quote [f4]) (quote grep-project))
(global-set-key (quote [f3]) (quote toggle-truncate-lines))
(global-set-key (quote [f5]) (quote visit-tags-table))
(global-set-key (quote [f6]) (quote tags-search))
(global-set-key (quote [f7]) (quote tags-loop-continue))



(setq savehist-additional-variables    ;; also save...
  '(search-ring regexp-search-ring)    ;; ... my search entries
  savehist-file "~/.emacs.d/savehist") ;; keep my home clean
(savehist-mode t)                      ;; do customization before activate

(setq she)